Magnetic field sensors are used to detect the position of magnetic targets. Such sensors are often used in the detection of speed and position of a magnetic moving object, or a moving object that has one or more magnetic elements mounted to it. For example, a magnet placed on a rotating wheel or shaft will produce a magnetic field. As the wheel or shaft spins, the magnetic target will also spin and change position. A magnetic field sensor placed near the wheel or shaft generates a signal that represents a detected magnetic field, which can be used to compute speed of rotation, current position, direction of rotation and other parameters associated with the wheel or shaft.